# -*- coding: utf-8 -*-

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

from models import *

class UsuarioPerfilAdmin(admin.TabularInline):
    model = UsuarioPerfil

class EnderecoAdmin(admin.TabularInline):
    model = Endereco
    extra = 1

class TelefoneAdmin(admin.TabularInline):
    model = Telefone
    extra = 1

# Define a new User admin
class UserAdmin(admin.ModelAdmin):
    inlines = [UsuarioPerfilAdmin, EnderecoAdmin, TelefoneAdmin]

admin.site.register(Caixa)

admin.site.unregister(User)
admin.site.register(User, UserAdmin)

admin.site.register(Produto)
admin.site.register(Dia_funcionamento)
admin.site.register(Venda)
admin.site.register(Evento)
admin.site.register(Item)
